

module.exports = {
    DEBUG:4,
    INFO:3,
    WARNING:2,
    ERROR:1,

    level:4,

    _instance:null,

    getLogger:function(){
        if(this._instance == null){
            this._instance = new Logger();
        }
        return this._instance;
    },


    setLevel:function (level) {
        this.level = level;
    },


    getLevel:function(){
        return this.level;
    },

    debug:function(log){
        
        if(this.getLevel() >= this.DEBUG){
            console.log(log);
        }
    },

    info:function (log) {
        if (this.getLevel() >= this.INFO) {
            console.info(log);
        }
    },
    warn:function (log) {
        if (this.getLevel() >= this.WARNING) {
            console.warn(log);
        }
    },
    error:function (log) {
        if (this.getLevel() >= this.ERROR) {
            console.error(log);
        }
    }
}